using UniversalAdmin.Application.DTOs;

namespace UniversalAdmin.Application.Services;

public interface ISystemConfigService
{
    Task<IEnumerable<SystemConfigDto>> GetAllConfigsAsync();
    Task<SystemConfigDto?> GetConfigByKeyAsync(string key);
    Task<SystemConfigDto> CreateConfigAsync(CreateSystemConfigDto dto);
    Task<SystemConfigDto?> UpdateConfigAsync(string key, UpdateSystemConfigDto dto);
    Task<bool> DeleteConfigAsync(string key);
    Task<T?> GetConfigValueAsync<T>(string key, T? defaultValue = default);
    Task SetConfigValueAsync<T>(string key, T value, string? description = null);
}